package com.shhm.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.shhm.business.dto.request.FilterProductReq;
import com.shhm.common.dto.response.AjaxResultPlus;
import com.shhm.common.dto.response.business.ProductVO;
import com.shhm.common.entity.admin.StudentEntity;
import com.shhm.common.entity.common.OrderEntity;
import com.shhm.common.entity.common.ProductEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author JackZ
 * @version 1.0
 * @description: TODO
 * @date 2025/9/2 下午3:15
 */
@Mapper
public interface ProductMapper extends BaseMapper<ProductEntity> {
    PageDTO<ProductVO> pageList(PageDTO<ProductVO> defPage);

//    PageDTO<ProductVO> shelvesList(PageDTO<ProductVO> defPage);

    PageDTO<ProductVO> selectProductsWithStatusByCondition(PageDTO<ProductVO> defPage, ProductVO entity);
//    @Update("")
    int customUpdate(ProductVO entity);


    PageDTO<ProductVO> auditList(PageDTO<ProductVO> defPage);

    PageDTO<ProductVO> sellerProductList(PageDTO<ProductVO> defPage,Long sellerId);

    int customDeleteProduct(@Param("productNums") List<Object> productNums, String tn);

    PageDTO<ProductEntity> haveUniversityList(PageDTO<ProductEntity> page,String universityCode);

    PageDTO<ProductEntity> filterProductsParams(PageDTO<ProductEntity> page,@Param("param") FilterProductReq param);

    List<ProductEntity> selectBannerList();

    List<ProductEntity> selectSellerShelfProducts(Integer sellerId);

    Integer createOrderByProductId(@Param("entity") OrderEntity entity);

    int applicationStudent(@Param("entity") StudentEntity entity);
}
